<?php

	$this->display(tpl('head'));
	$iswrite_Template[$setting['iswrite_Template']]="checked";
	$webstate[$setting['webstate']]="checked";
	$qinghuancun[$setting['qinghuancun']]="checked";
	$delshangxian[$setting['delshangxian']]="checked";
	$ssl[$setting['ssl']]="checked";
	$html[$setting['html']]="selected";
	$url_rules[$setting['url_rules']]="checked";
	$index[$setting['index']]='selected';
	$is_log[$setting['is_log']]="checked";
	$cookie_is_en[$setting['cookie_is_en']]="checked";
?>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  <legend>网站设置</legend>
</fieldset>
<style>
	.layui-form-select {
	    position: relative;
	    width: 30%;
	}
</style>
<form id="SETForm" class="layui-form" method="post">
	<table class="layui-table my-tabel">
		<tbody>
			<tr>
				<td>网站状态</td>
				<td>
					<input type="radio" name="web[webstate]" title="开启" value="1" <?php echo $webstate[1] ?>/>
            		<input type="radio" name="web[webstate]" title="关闭" value="0" <?php echo $webstate[0] ?>/>
            		<p>如果关闭了，则只能登陆后台。插件及模块都不可访问</p>
				</td>
			</tr>
			<tr>
				<td>网站状态</td>
				<td>
					<textarea class="layui-textarea my-input" placeholder="关闭原因" name="web[close_why]"><?php echo $setting['close_why'] ?></textarea>
				</td>
			</tr>
			<tr>
				<td>默认首页</td>
				<td>
					<select name="web[index]" id="selection" class="my-input">
						<option value="" >请选择一个模块做为首页</option>
						<option value="home" <?php echo $index['home'] ?>>home</option>
						<?php foreach($modular as $row) { ?>
						<option value="<?php echo $row[dir]	?>" <?php echo	$index[$row[dir]] ?>><?php echo $row[name] ?></option>
						<?php } ?>
					</select>
					<p>请选择一个模块作为首页</p>
				</td>
			</tr>
			<tr>
				<td>启用SSL(启用https服务)</td>
				<td>
					<input type="radio" name="web[ssl]" title="开启SSL" value="1" <?php echo $ssl[1] ?>/>
            		<input type="radio" name="web[ssl]" title="关闭SSL" value="0" <?php echo $ssl[0] ?>/>
				</td>
			</tr>
			<tr>
				<td>主域名</td>
				<td>
					<input name="web[weburl]" value="<?php echo $setting['weburl'] ?>" class="layui-input my-input" type="text">
				</td>
			</tr>
			<tr>
				<td>cookie有效域</td>
				<td>
					<input name="web[cookie_domain]"  value="<?php echo $setting['cookie_domain'] ?>" type="text" class="layui-input my-input">
					<p>请填写不带WWW.的一级域名</p>
				</td>
			</tr>
			<tr>
				<td>网站名称</td>
				<td>
					<input name="web[webname]" value="<?php echo $setting['webname'] ?>" id="webname" lay-verify="title" autocomplete="off" class="layui-input" type="text">
				</td>
			</tr>
			<tr>
				<td>SEO标题</td>
				<td>
					<input name="web[web_seo_webname]"  value="<?php echo $setting['web_seo_webname'] ?>" id="web_seo_webname" lay-verify="title" autocomplete="off" class="layui-input" type="text">
				</td>
			</tr>
			<tr>
				<td>SEO关键字</td>
				<td>
					<input name="web[web_seo_keywords]" value="<?php echo $setting['web_seo_keywords'] ?>" id="web_seo_keywords" lay-verify="title" autocomplete="off" class="layui-input" type="text">
				</td>
			</tr>
			<tr>
				<td>SEO描述信息</td>
				<td>
					<textarea name="web[web_seo_description]" class="layui-textarea"><?php echo $setting['web_seo_description'] ?></textarea>
				</td>
			</tr>
			<tr>
				<td>工信部备案号</td>
				<td>
					<input name="web[miibeian_num]" value="<?php echo $setting['miibeian_num'] ?>" class="layui-input" type="text">
				</td>
			</tr>
			<tr>
				<td>允许上传文件的类型</td>
				<td>
					<input name="web[upfiles_types]"  class="layui-input layui-input-my" type="text" value="<?php echo $setting['upfiles_types'] ?>">
				</td>
			</tr>
			<tr>
				<td>模板目录</td>
				<td>
					<select name="web[select_template]" id="selection">
						<?php echo $LIST_ALL_STYLE ?>
					</select>
				</td>
			</tr>
			<tr>
				<td>模板引擎缓存</td>
				<td>
					<input type="radio" name="web[iswrite_Template]" title="实时缓存" value="1" <?php echo $iswrite_Template[1] ?>/>
            		<input type="radio" name="web[iswrite_Template]" title="只缓存一次" value="0" <?php echo $iswrite_Template[0] ?>/>
				</td>
			</tr>
			<tr>
				<td>加密字符串</td>
				<td>
					<input name="web[md5]" placeholder="随便输入字符即可"  class="layui-input layui-input-my" type="text" value="<?php echo $setting['md5'] ?>">
				</td>
			</tr>
			<tr>
				<td>COOKIE键值状态</td>
				<td>
					<input type="radio" name="web[cookie_is_en]" title="加密" value="1" <?php echo $cookie_is_en[1] ?>/>
            		<input type="radio" name="web[cookie_is_en]" title="不加密" value="0" <?php echo $cookie_is_en[0] ?>/>
				</td>
			</tr>
			<tr>
				<td>网址伪静态后戳名</td>
				<td>
					<select name="web[html]" id="selection">
						<option value=".html"	<?php echo $html['.html']	 ?>>.html</option>
						<option value=".htm"	<?php echo $html['.htm']	 ?>>.htm</option>
						<option value=".shtml"	<?php echo $html['.shtml']	 ?>>.shtml</option>
						<option value=".php"	<?php echo $html['.php']  ?>	>.php</option>
					</select>
				</td>
			</tr>
			<tr>
				<td>是否记录访问日志</td>
				<td>
					<input type="radio" name="web[is_log]" title="记录" value="1" <?php echo $is_log[1] ?>/>
            		<input type="radio" name="web[is_log]" title="不记录" value="0" <?php echo $is_log[0] ?>/>
            		<p>若果记录的话，位置<?PHP echo APP_PATH ?>runtime/access_logs/查看</p>
				</td>
			</tr>
			
			<tr>
				<td colspan="2" class="my_button center" align="center">
					<input type="hidden" name="step" id="step" value="post" />
					<button class="layui-btn">立即提交</button>
				</td>
			</tr>
		</tbody>
		</tbody>
	</table>
</form>
<script>
	layui.use(['form', 'layedit', 'laydate'], function() {
		var form = layui.form,
			layer = layui.layer,
			layedit = layui.layedit,
			laydate = layui.laydate;
	});
</script>

<?php $this->display(tpl('foot')); 
